package com.niit;

import com.niit.entity.Orders;
import com.niit.entity.Orders2;
import com.niit.mapper.OrdersMapper;
import com.niit.util.MybatisUtil;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

public class TestOrders2 {
    public static void main(String[] args) {

        SqlSession sqlSession = MybatisUtil.getSqlSession();

        OrdersMapper ordersMapper = sqlSession.getMapper(OrdersMapper.class);
        List<Orders2> orders = ordersMapper.findAll2();

        for(Orders2 order : orders){
            System.out.println(order.toString());
        }
    }
}
